$(function ($) {
	var ele = [
		'<div loaded class="loading">',
		'<img src="static/img/preloader-w8-cycle-black.gif" />',
		'</div>'].join('');
	
	$("body").append(ele);
	
	$.extend({
		showloading: function () {
			$('div[loaded].loading').show();
			$("div[loaded].loading").animate({
				opacity: 1
			}, 500);
		},
		hideloading: function () {
			$("div[loaded].loading").animate({
				opacity: 0
			}, 500, function () {
				$(this).hide();
			});
		}
	});
});